\prog
command allows you to do this: its argument is set in
typewriter font.
For example
the call of the \prog{wild} is answered in \prog{kind}.appears as: the call of the wild is answered in kind.
This command behaves exactly like a \tt
declaration (see
) except that it redefines the \bslash
command (see for details).
Long text
For longer pieces of program text, the verbatim
environment
is used, see for details.
The iso style provides for the creation of multiple verbatim
environments with the \newverbatim
command; this allows different
types of program text to be enclosed in different environments.
Thus:
\newverbatim{example} \newverbatim{definition}creates two new environments,
example
and definition
,
each of whose contents is displayed in the same way; an automatic
tool could now be written to, say, extract all example text and ensure
that it is syntactically valid.